﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.NetworkInformation;
using System.Text;
using System.Threading.Tasks;

namespace Meiam.System.Common
{
    public class PingHeper
    {
        public static bool PingIP(string ip)
        {
            bool online = false; //是否在线
            Ping ping = new Ping();
            PingReply pingReply = ping.Send(ip);

            if (pingReply.Status == IPStatus.Success)
            {
                online = true;
            }
            else
            {
                online = false;
            }
            return online;
        }
    }
}
